package com.example.webcrawler.model;

import lombok.Data;

@Data
public class Breakpoint {
        private final String id;
        private final String type;
        private final String target;
        private final int lineNumber;
        private final int columnNumber;
        private final String condition;
        private boolean enabled; // 断点启用状态
        private int hitCount; // 命中次数

        public Breakpoint(String id, String type, String target, int lineNumber, int columnNumber, String condition) {
                this.id = id;
                this.type = type;
                this.target = target;
                this.lineNumber = lineNumber;
                this.columnNumber = columnNumber;
                this.condition = condition;
                this.enabled = true; // 默认启用
                this.hitCount = 0;
        }

        // 增加命中次数
        public void incrementHitCount() {
                this.hitCount++;
        }
}
